#ifndef TRANSLATOR_HEADER_VIZMF_PROJECT
#define TRANSLATOR_HEADER_VIZMF_PROJECT

#include <QObject>
#include <QString>
#include <string>

// Translator class
// Makes Qt translation backend easly removable

class Translator : public QObject
{
Q_OBJECT
public:
  Translator() {}
  std::string stdString(const char *phrase , const char *desc)
  {
    return QObject::tr(phrase, desc).toStdString();
  }
  std::string stdString(const std::string& phrase, const std::string& desc)
  {
    return QObject::tr(phrase.c_str(), desc.c_str()).toStdString();
  }
  std::string stdString(const char *phrase )
  {
    return QObject::tr(phrase).toStdString();
  }
  std::string stdString(const std::string& phrase )
  {
    return QObject::tr(phrase.c_str()).toStdString();
  }
  QString qString(const char *phrase , const char *desc)
  {
    return QObject::tr(phrase, desc);
  }
  QString qString(const std::string& phrase , const std::string& desc)
  {
    return QObject::tr(phrase.c_str(), desc.c_str());
  }
  QString qString(const char *phrase)
  {
    return QObject::tr(phrase);
  }
  QString qString(const std::string& phrase)
  {
    return QObject::tr(phrase.c_str());
  }
};

#endif // TRANSLATOR_HEADER_VIZMF_PROJECT
